import React from 'react';
import { Button } from 'antd';
import PubSub from 'pubsub-js' 

const DownloadBtn = ({ filename, url }) => {
  const download = () => {
    //window.open(url, '_self');
    PubSub.publish('getdata',{user:'shaofangshu'})

  };

  return <Button type="link" onClick={() => download()}>{`《${filename}》`}</Button>;
};
DownloadBtn.defaultProps = {
  filename: '自定义值',
};

export default DownloadBtn;
